package code._14thread.api;

public class Demo2 {
    public static void main(String[] args) {
        MyThread2 t = new MyThread2();
        //设置线程的优先级
        t.setPriority(Thread.MAX_PRIORITY);
        int priority=t.getPriority();
        System.out.println("priority= "+priority);
        t.start();
    }
}

class MyThread2 extends Thread{
    @Override
    public void run() {
        System.out.println("aaaaaaa");
    }
}
